interface FetchQRCodeClassListAPIParams {
  page: string
  limit: string
}

interface FetchQRCodeClassListAPIResData {
  code: number
  msg: string
  time: string
  data: {
    data: ClassWithQRCode[]
    current_page: number
    total: number
    per_page: number
    last_page: number
  }
}

/**
 * @description 分页获取管理员“签到二维码”中的班级列表数据
 */
export function fetchQRCodeClassListAPI(params: FetchQRCodeClassListAPIParams, token: string) {
  return httpInstance.get<FetchQRCodeClassListAPIResData, FetchQRCodeClassListAPIParams>(
    '/api/sign/signcodelist',
    { params, headers: { token } },
  )
}
